package com.onpositive.mediawiki.serializing;

import java.io.DataOutputStream;
import java.io.IOException;

import com.onpositive.data.serializer.writers.StringWriter;
import com.onpositive.units.ParsedIdent;

public class IdentWriter extends AbstractMediaWikiWriter<ParsedIdent>
{
	StringWriter sw = new StringWriter() ;
	
	public IdentWriter()
	{
		super(ParsedIdent.class);
	}

	@Override
	protected void append(ParsedIdent obj) {
		
		String str = obj != null ? (String)obj.value() : null ;
		sw.append(str);		
	}

	@Override
	public void serialize(DataOutputStream stream) throws IOException {
		sw.serialize(stream) ;		
	}
}
